/*
 * @Date: 2021-11-30 15:42:07
 * @LastEditors: 春贰
 * @Desc: 
 * @LastEditTime: 2023-11-28 16:15:32
 * @FilePath: \web\src\route\index.js
 */
import {createRouter, createWebHashHistory} from 'vue-router'
import routes from './all-routes'
import NProgress from "nprogress";
import "nprogress/nprogress.css";
import { permissionController } from "./permission.js";

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

 
router.beforeEach(permissionController)
 

router.afterEach((to, from) => {
  NProgress.done();
})

export default router